package cn.kgc.kgde.bookstore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author myt
 * @since 2022-05-31
 */
@TableName("order_detail")
@ApiModel(value = "OrderDetail对象", description = "")
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "detailId", type = IdType.AUTO)
    private Long detailId;

    @ApiModelProperty("订单id")
    private String orderId;

    @ApiModelProperty("图书id")
    private Long bookId;

    @ApiModelProperty("图书名称")
    private String bookName;

    @ApiModelProperty("价格")
    private Double bookPrice;

    @ApiModelProperty("数量")
    private Integer quantity;

    @ApiModelProperty("小计")
    private Double cost;

    public Long getDetailId() {
        return detailId;
    }

    public void setDetailId(Long detailId) {
        this.detailId = detailId;
    }
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public Long getBookId() {
        return bookId;
    }

    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }
    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }
    public Double getBookPrice() {
        return bookPrice;
    }

    public void setBookPrice(Double bookPrice) {
        this.bookPrice = bookPrice;
    }
    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }
    public Double getCost() {
        return cost;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    @Override
    public String toString() {
        return "OrderDetail{" +
            "detailId=" + detailId +
            ", orderId=" + orderId +
            ", bookId=" + bookId +
            ", bookName=" + bookName +
            ", bookPrice=" + bookPrice +
            ", quantity=" + quantity +
            ", cost=" + cost +
        "}";
    }
}
